package com.googlecode.scenemaker3d.services
{
	import org.papervision3d.render.BasicRenderEngine;
	import org.papervision3d.scenes.Scene3D;
	import org.papervision3d.core.utils.InteractiveSceneManager;
	
	public class World
	{
		private static var _instance:World;
		private static var isOK:Boolean = false;
		
		public  var renderer:BasicRenderEngine = new BasicRenderEngine();
		public  var scene:Scene3D = new Scene3D();
		
		public function World()
		{
			if(!isOK){
				throw(new Error("This is a singleton. Do not instantiate. Use World.instance"));
			}
		}
		public static function get instance():World{
			if(!_instance){
				isOK = true;
				_instance = new World();
				isOK = false;
			}
			return _instance;
		}

	}
}